project(btl-extra)
cmake_minimum_required(VERSION 2.8)

# output layout and naming settings
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")

set(CMAKE_DEBUG_POSTFIX "_d")

# ---------------------------------------------------------------------
# Global configuration

# FIXME: replace with find_package(BTL2 REQUIRED) when a find module is written
if (NOT BTL2_FOUND)
   message(SEND_ERROR "BTL2 not found")
endif()

# global build settings
include_directories(
	include
   ${BTL2_INCLUDE_DIRS}
)

add_subdirectory(src/VideoSource)
add_subdirectory(src/Gui)
add_subdirectory(src/Simulation)

# ---------------------------------------------------------------------
# Set some variables for the benefit of co-configured projects that
# want to use BTL

set(BTL2_EXTRA_FOUND TRUE PARENT_SCOPE)
set(BTL2_EXTRA_LIBRARIES
   BtlExtraGui
   BtlExtraVideoSource
   BtlExtraSimulation
   ${BTL2_LIBRARIES}
   PARENT_SCOPE
)
set(BTL2_EXTRA_INCLUDE_DIRS
	"${CMAKE_CURRENT_SOURCE_DIR}/include"
	${BTL2_INCLUDE_DIRS}
	PARENT_SCOPE
)

